#ifndef FORWARDSVR_H
#define FORWARDSVR_H

#include <QWidget>
#include <QDateTime>
#include <QTimer>
#include "ctcpsvrproc.h"
#include "ctcpclientproc.h"



namespace Ui {
class forwardSvr;
}

class forwardSvr : public QWidget
{
    Q_OBJECT
    
public:
    explicit forwardSvr(QWidget *parent = 0);
    ~forwardSvr();

public slots:
    void svrDataRecv(QByteArray &qaData);
    void clientDataRecv(QByteArray &qaData);
    void recvErrMsg(QString &str);

    void clearNoticeMsg();
    void onSvrdisConnect();
    void onClientdisConnect();
    void onHasNewConnect();

private slots:
    void on_startButton_clicked();

    void on_stopButton_clicked();

    void on_storeDataflag_clicked(bool checked);

    void on_svrDataClearButton_clicked();

    void on_clientDataClearButton_clicked();

    void on_hexRadioButton_clicked();

    void on_asciiRadioButton_clicked();

    void on_storeDataflag_clicked();

private:
    Ui::forwardSvr *ui;
    bool dataStoreFlag;

    CTcpSvrProc *tcpSvrProc;
    CTcpClientProc *tcpClientProc;

    bool bHexMod;

    QTimer *tNoticeMsgClearTimer;
};

#endif // FORWARDSVR_H
